package com.highcom.service.impl;

import com.highcom.mapper.CompanyMapper;
import com.highcom.pojo.Company;
import com.highcom.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompanyServiceImpl implements CompanyService {
    @Autowired
    private CompanyMapper companyMapper;
    @Override
    public List<Company> findCompanys() {
        return companyMapper.findCompanys();
    }

    @Override
    public void delCompanyById(int id) {
        companyMapper.delCompanyById(id);
    }

    @Override
    public void delCompanysByIds(int[] ids) {
        for (int id : ids) {
            companyMapper.delCompanyById(id);
        }
    }

    @Override
    public Company findCompanyById(int id) {
        return companyMapper.findCompanyById(id);
    }

    @Override
    public void modifyCompany(Company company) {
        companyMapper.modifyCompany(company);
    }

    @Override
    public void addCompany(Company company) {
        companyMapper.addCompany(company);
    }

    @Override
    public List<Company> findCompanysLikeQuery(Company company) {
        return companyMapper.findCompanysLikeQuery(company);
    }
}
